package com.youi.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.youi.shop.commons.result.RespEntity;
import com.youi.shop.pojo.entity.CompanyAddress;
import com.youi.shop.pojo.qo.address.AddressQO;
import com.youi.shop.pojo.vo.address.MemberAddressVO;
import com.youi.shop.pojo.vo.address.UserAddressVO;

import java.util.List;

/**
 * <p>
 * 地址表 服务类
 * </p>
 *
 * @author xxf
 * @since 2020-11-09
 */
public interface CompanyAddressService extends IService<CompanyAddress> {

    /**
     * 根据会员id查询
     * @param memberId
     * @return
     */
    RespEntity<List<MemberAddressVO>> selectByMemberId(Long memberId);

    /**
     * 根据商家用户id查询
     * @param userId
     * @return
     */
    RespEntity<List<UserAddressVO>> selectByUserId(Long userId);

    /**
     * 插入单条
     * @param addressQO
     * @return
     */
    boolean insert( AddressQO addressQO);

    /**
     * 修改单条
     * @param addressQO
     * @return
     */
    CompanyAddress updateById(AddressQO addressQO);



    /**
     * 根据id逻辑删除
     * @param addressIds
     * @return
     */
    boolean deleteByIds(List<Long> addressIds);
}
